#ifndef _BT_XMLOBJECT_H_
#define _BT_XMLOBJECT_H_

#include <libxml/parser.h>
#include <SDL/SDL.h>
#include <string>
#include "filesystem.h"
#include "tools.h"

namespace bt
{
	class XMLObject
	{
	public:
		virtual bool loadFromXML(xmlDoc* doc, xmlNode* node);
		
		virtual void writeToXML(xmlDoc* doc, xmlNode* node);
		
		bool loadFromXMLFile(const char* filename);
		
		bool writeToXMLFile(const char* filename);
	};
	
	// XML Node Property helper functions
	std::string XML_getPropString(xmlNode* node, const char* name);
	
	int XML_getPropInt(xmlNode* node, const char* name);
	
	float XML_getPropFloat(xmlNode* node, const char* name);
	
	// XML Node Content helper functions
	std::string XML_getContentString(xmlNode* node);
}

#endif /* _BT_XMLOBJECT_H_ */
